<html>
<head><meta charset="utf-8"><title>Move the compiler to a new `compiler/` di… compiler-team#336 · t-compiler/major changes · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/index.html">t-compiler/major changes</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html">Move the compiler to a new `compiler/` di… compiler-team#336</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205195713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205195713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205195713">(Jul 28 2020 at 03:45)</a>:</h4>
<p>A new proposal has been announced: <a href="https://github.com/rust-lang/compiler-team/issues/336">#336</a>. It will be announced at the next meeting to try and draw attention to it, but usually MCPs are not discussed during triage meetings. If you think this would benefit from discussion amongst the team, consider proposing a design meeting.</p>



<a name="205195785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205195785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205195785">(Jul 28 2020 at 03:47)</a>:</h4>
<p>I would like to propose that we resolve some of the unresolved questions before the proposal is seconded</p>



<a name="205196736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205196736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205196736">(Jul 28 2020 at 04:14)</a>:</h4>
<p>Oh, another question: should we add nested <code>src/</code> directories? I feel like the answer is yes for consistency with <code>library/</code></p>



<a name="205197617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205197617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205197617">(Jul 28 2020 at 04:39)</a>:</h4>
<p>Slightly more out there: what do people think of removing the <code>rustc_</code> prefixes of all the crates? i.e. we would have crates <code>ast</code>, <code>span</code>, <code>mir</code>, <code>lexer</code>, <code>middle</code>, <code>lint</code>,  <code>traits</code>, etc...</p>



<a name="205197681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205197681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205197681">(Jul 28 2020 at 04:41)</a>:</h4>
<p>Just playing around here: <a href="https://github.com/rust-lang/rust/pull/74862">https://github.com/rust-lang/rust/pull/74862</a></p>
<p>It's surprisingly easy to move most of the crates -- it's just updating the <code>Cargo.toml</code>. The LLVM stuff could be tricky because it interacts with bootstrap, though.</p>



<a name="205198918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205198918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205198918">(Jul 28 2020 at 05:13)</a>:</h4>
<p><span class="user-mention silent" data-user-id="198054">mark-i-m</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205197617">said</a>:</p>
<blockquote>
<p>Slightly more out there: what do people think of removing the <code>rustc_</code> prefixes of all the crates? i.e. we would have crates <code>ast</code>, <code>span</code>, <code>mir</code>, <code>lexer</code>, <code>middle</code>, <code>lint</code>,  <code>traits</code>, etc...</p>
</blockquote>
<p>Hmm... actually this would require writing the imports in every file... so maybe not...</p>



<a name="205201999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205201999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205201999">(Jul 28 2020 at 06:31)</a>:</h4>
<p>Organizationally, I think it makes sense to start with moving llvm-project to the top. It is somewhat orthogonal to the proposal, but I think is clearly desirable for a very tangible benefit of easier grepping, etc (and not just to make structure more sane). It will also probably be the most painful one, with respect to fixing paths</p>



<a name="205202165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205202165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205202165">(Jul 28 2020 at 06:35)</a>:</h4>
<p>Looking at the PR, another option to move <em>everything but conpiler</em> out of src first, and then rename the dir.</p>



<a name="205202579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205202579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205202579">(Jul 28 2020 at 06:45)</a>:</h4>
<p>Wow this will be so painful for all ongoing parallel development.^^ It will also make code archeology so much more annoying for the next few years as "git blame" is basically unable to follow renames. I hope y'all are convinced that such a hugely disruptive change is really worth it. IMO the current structure isn't great, but it also not so bad to justify so much pain. (Moving submodules is particularly painful in my experience, in particular huge ones like llvm-project.)</p>



<a name="205204789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205204789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205204789">(Jul 28 2020 at 07:29)</a>:</h4>
<p>I've never had problems with git blame and renames. I recently blamed a test from pre 1.0 and it definitely has moved a few times since then. The only thing that breaks is github's "file history", but even github's blame still works correctly</p>



<a name="205205078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205205078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tshepang Lekhonkhobe <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205205078">(Jul 28 2020 at 07:34)</a>:</h4>
<p><span class="user-mention silent" data-user-id="198054">mark-i-m</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205197617">said</a>:</p>
<blockquote>
<p>Slightly more out there: what do people think of removing the <code>rustc_</code> prefixes of all the crates? i.e. we would have crates <code>ast</code>, <code>span</code>, <code>mir</code>, <code>lexer</code>, <code>middle</code>, <code>lint</code>,  <code>traits</code>, etc...</p>
</blockquote>
<p>am a fan of removing the prefix, provided it isn't too painful... maybe can be automated with help of <code>sd</code> and similar</p>



<a name="205205130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205205130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205205130">(Jul 28 2020 at 07:35)</a>:</h4>
<p><span class="user-mention silent" data-user-id="198054">mark-i-m</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205198918">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="198054">mark-i-m</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205197617">said</a>:</p>
<blockquote>
<p>Slightly more out there: what do people think of removing the <code>rustc_</code> prefixes of all the crates? i.e. we would have crates <code>ast</code>, <code>span</code>, <code>mir</code>, <code>lexer</code>, <code>middle</code>, <code>lint</code>,  <code>traits</code>, etc...</p>
</blockquote>
<p>Hmm... actually this would require writing the imports in every file... so maybe not...</p>
</blockquote>
<p>we could start with just renaming the directories but keeping the crate names</p>



<a name="205207893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205207893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205207893">(Jul 28 2020 at 08:14)</a>:</h4>
<blockquote>
<p>IMO the current structure isn't great, but it also not so bad to justify so much pain. </p>
</blockquote>
<p>The current pain accumulates over time, the pain from reorg is temporary (provided that there's fixed point to reorgs). If I take "over time" effects into account, for me personally it is very clear that build process simplification (of which runtime/compiler split is a per-requisite)  is worth the pain. Though, I am spoiled by working in the rust-analyzer code base, which is just a big boring stable Cargo workspace :D</p>



<a name="205208087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205208087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205208087">(Jul 28 2020 at 08:17)</a>:</h4>
<blockquote>
<p>Unresolved question: there was also some questions about what to do with the current rustc crate (effectively, the <a href="http://main.rs">main.rs</a> of the compiler), which is basically just a main function that calls rustc_driver. In the above proposal, I have it as bin/rustc.rs.</p>
</blockquote>
<p>Remove the <code>rustc</code> crate and move that file over to <code>librustc_driver/src/bin/rustc.rs</code>?</p>



<a name="205215568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205215568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205215568">(Jul 28 2020 at 09:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="124288">oli</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205204789">said</a>:</p>
<blockquote>
<p>I've never had problems with git blame and renames. I recently blamed a test from pre 1.0 and it definitely has moved a few times since then. The only thing that breaks is github's "file history", but even github's blame still works correctly</p>
</blockquote>
<p>that is not my experience, github's blame has stopped on renames many times for me</p>



<a name="205215731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205215731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205215731">(Jul 28 2020 at 09:42)</a>:</h4>
<p>submodule renames do not lead to the old submodule being deleted, you have to manually delete the old dir <em>and</em> the data in <code>.git/modules</code> , I think.</p>



<a name="205215771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205215771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205215771">(Jul 28 2020 at 09:42)</a>:</h4>
<p>but it seems like rebase handles renames so at least that part should not be as bad as I thought</p>



<a name="205249081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205249081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205249081">(Jul 28 2020 at 15:16)</a>:</h4>
<p><span class="user-mention silent" data-user-id="124288">oli</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205205130">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="198054">mark-i-m</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205198918">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="198054">mark-i-m</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205197617">said</a>:</p>
<blockquote>
<p>Slightly more out there: what do people think of removing the <code>rustc_</code> prefixes of all the crates? i.e. we would have crates <code>ast</code>, <code>span</code>, <code>mir</code>, <code>lexer</code>, <code>middle</code>, <code>lint</code>,  <code>traits</code>, etc...</p>
</blockquote>
<p>Hmm... actually this would require writing the imports in every file... so maybe not...</p>
</blockquote>
<p>we could start with just renaming the directories but keeping the crate names</p>
</blockquote>
<p>Are you proposing that we would over time remove the prefixes from the names and fix imports? It would be weird for the crate and directory to have different names; that kind of goes against the objective of making things a bit more idiomatic</p>



<a name="205249129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205249129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205249129">(Jul 28 2020 at 15:17)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133169">matklad</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205208087">said</a>:</p>
<blockquote>
<blockquote>
<p>Unresolved question: there was also some questions about what to do with the current rustc crate (effectively, the <a href="http://main.rs">main.rs</a> of the compiler), which is basically just a main function that calls rustc_driver. In the above proposal, I have it as bin/rustc.rs.</p>
</blockquote>
<p>Remove the <code>rustc</code> crate and move that file over to <code>librustc_driver/src/bin/rustc.rs</code>?</p>
</blockquote>
<p><span class="user-mention" data-user-id="123856">@Vadim Petrochenkov</span> proposed making it <code>rustc/main.rs</code>, which I kind of like</p>



<a name="205249316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205249316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205249316">(Jul 28 2020 at 15:19)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120791">RalfJ</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205215731">said</a>:</p>
<blockquote>
<p>submodule renames do not lead to the old submodule being deleted, you have to manually delete the old dir <em>and</em> the data in <code>.git/modules</code> , I think.</p>
</blockquote>
<p>Yeah, submodules are a bit crazy and painful in general though, and I don't think I've ever needed to browse blame into a submodule as opposed to just browsing the blame in the submodule repo directly...</p>



<a name="205249613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205249613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205249613">(Jul 28 2020 at 15:21)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133169">matklad</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205201999">said</a>:</p>
<blockquote>
<p>Organizationally, I think it makes sense to start with moving llvm-project to the top. It is somewhat orthogonal to the proposal, but I think is clearly desirable for a very tangible benefit of easier grepping, etc (and not just to make structure more sane). It will also probably be the most painful one, with respect to fixing paths</p>
</blockquote>
<p>Is anyone opposed to doing this in 2 separate PRs (i.e. one to move llvm-project, llvmrust, rustc_llvm somewhere; one to move rustc_&lt;everything else&gt; to compiler/)?</p>



<a name="205249741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205249741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205249741">(Jul 28 2020 at 15:22)</a>:</h4>
<p>More broadly, it seems reasonable for  llvm-project, llvmrust, rustc_llvm to live together somewhere, but having them all in the root seems bad. Should we move them all into <code>llvmrust</code> at the root? any thoughts?</p>



<a name="205252287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205252287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205252287">(Jul 28 2020 at 15:40)</a>:</h4>
<p>Also, does anyone have opinions about moving the compiler tests? I think <span class="user-mention" data-user-id="123856">@Vadim Petrochenkov</span> had expressed some concerns. (Perhaps moving tests is a 3rd PR?)</p>



<a name="205252359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205252359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205252359">(Jul 28 2020 at 15:41)</a>:</h4>
<p><span class="user-mention" data-user-id="198054">@mark-i-m</span> what exactly are "compiler tests"?</p>



<a name="205252451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205252451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205252451">(Jul 28 2020 at 15:42)</a>:</h4>
<p>Things like <code>src/test/ui</code>? I <em>think</em> they should be treated not like compiler tests, but like "implementation conformance tests", and be somewhat independent of particular compiler implementation.</p>



<a name="205253386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205253386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205253386">(Jul 28 2020 at 15:49)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> Its a good question. <a href="https://github.com/rust-lang/compiler-team/issues/336">compiler-team#336</a> says "The <code>src/test</code> directory is split up to <code>compiler/test</code> and <code>src/test</code>",</p>



<a name="205253447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205253447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205253447">(Jul 28 2020 at 15:49)</a>:</h4>
<p>I would personally say that the format of our diagnostics is a property of a specific compiler implementation</p>



<a name="205253523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205253523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205253523">(Jul 28 2020 at 15:50)</a>:</h4>
<p>and therefore <code>src/test/ui</code>, at least as <em>originally</em> envisaged, <strong>would</strong> be compiler-specific</p>



<a name="205253660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205253660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205253660">(Jul 28 2020 at 15:51)</a>:</h4>
<p>but there's probably a gradient of perspectives here</p>



<a name="205253802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205253802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205253802">(Jul 28 2020 at 15:52)</a>:</h4>
<p>certainly things like the <code>mir-opt</code> tests that <em>definitely</em> inspecting compiler-internal details should be considered compiler-specific. But that's in <code>src/test/mir-opt</code>, of course.</p>



<a name="205270296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205270296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205270296">(Jul 28 2020 at 18:09)</a>:</h4>
<p>In my mind, I was thinking everything in <code>src/test/</code> except for the <code>rustdoc</code> tests (<code>src/test/rustdoc*</code>)... Basically, if you change the compiler and it could impact the output of the test, it seems like that is a "compiler test"... but maybe I'm not thinking about some cases?</p>



<a name="205270330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205270330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205270330">(Jul 28 2020 at 18:09)</a>:</h4>
<p>I'm open to tests being somewhere else, though</p>



<a name="205271899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205271899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205271899">(Jul 28 2020 at 18:23)</a>:</h4>
<p><span class="user-mention silent" data-user-id="198054">mark-i-m</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205197617">said</a>:</p>
<blockquote>
<p>Slightly more out there: what do people think of removing the <code>rustc_</code> prefixes of all the crates? i.e. we would have crates <code>ast</code>, <code>span</code>, <code>mir</code>, <code>lexer</code>, <code>middle</code>, <code>lint</code>,  <code>traits</code>, etc...</p>
</blockquote>
<p>Many of the crate names are too generic for that, IMO.</p>



<a name="205272070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205272070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205272070">(Jul 28 2020 at 18:24)</a>:</h4>
<p>Even those that are compiler related (e.g. <code>rustc_parse</code>) and not just generic (<code>rustc_data_structures</code>).</p>



<a name="205272170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205272170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205272170">(Jul 28 2020 at 18:25)</a>:</h4>
<p>I like it as is, personally.</p>



<a name="205279516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205279516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205279516">(Jul 28 2020 at 19:26)</a>:</h4>
<p>I guess my intuition is that if all crates have a <code>rustc_</code> prefix, it doesn't seem to add much beyond having everything in a <code>compiler/</code> directory... For example, the name <code>ty</code> doesn't seem any more or less descriptive than <code>rustc_ty</code> to me...</p>



<a name="205285260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205285260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205285260">(Jul 28 2020 at 20:18)</a>:</h4>
<p>Procedurally, removing <code>rustc_</code> prefix would require a lot of churn (and discussion), so it seems prudent to just table this discussion regardless of our opinions :-) Even if we do want to change all the imports, it's better done in a separate commit, to not mix rename &amp; change together. </p>
<p>Also, don't listen to me about this: in rust-analyzer, half of the crates have <code>ra_</code> prefix and half don't :D</p>



<a name="205828663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/205828663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#205828663">(Aug 03 2020 at 18:19)</a>:</h4>
<p>Ok, so for now, let's just remove the <code>lib*</code> prefix for now.</p>



<a name="207023082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/207023082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#207023082">(Aug 15 2020 at 13:57)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="492">@T-compiler</span>: Proposal <a href="https://github.com/rust-lang/compiler-team/issues/336#issuecomment-674401773">#336</a> has been seconded, and will be approved in 10 days if no objections are raised.</p>



<a name="207040855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/207040855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#207040855">(Aug 15 2020 at 21:46)</a>:</h4>
<p>I'm going to propose that we do two separate fcps: first for the existing PR and then for the remainder of the stuff mentioned in the MCP (tests, llvm, etc)</p>



<a name="208142565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/208142565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#208142565">(Aug 26 2020 at 20:14)</a>:</h4>
<p>This proposal has been accepted: <a href="https://github.com/rust-lang/compiler-team/issues/336">#336</a>.</p>



<a name="208988176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/208988176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#208988176">(Sep 03 2020 at 15:50)</a>:</h4>
<p>since mark is "taking a break", i'll be taking over any work that's involved with this <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="209050993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209050993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tshepang Lekhonkhobe <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209050993">(Sep 04 2020 at 03:06)</a>:</h4>
<p>nice suggestions from <a href="#narrow/stream/131828-t-compiler/topic/ninja">this topic</a>... rename <code>library</code> to <code>lib</code> and <code>compiler</code> to <code>rustc</code>, and remove <code>rustc_</code> from dirs in <code>rustc/</code></p>



<a name="209097283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209097283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209097283">(Sep 04 2020 at 14:05)</a>:</h4>
<p>There was some discussion earlier in the thread about removing the <code>rustc_</code> prefixes and it sounded like that was a major undertaking for another time</p>



<a name="209097336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209097336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209097336">(Sep 04 2020 at 14:05)</a>:</h4>
<p>Because you would have to update all of the imports everywhere (unless you just wanted to change the directory without changing the crate name, which could also be reasonable)</p>



<a name="209097491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209097491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209097491">(Sep 04 2020 at 14:07)</a>:</h4>
<blockquote>
<p>rename library to lib and compiler to rustc</p>
</blockquote>
<p>If we rename <code>compiler</code> to <code>rustc</code>, then <code>library</code> should become <code>std</code>, as per "either both are proper nouns or both a common nouns"</p>



<a name="209098485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209098485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209098485">(Sep 04 2020 at 14:16)</a>:</h4>
<p>Are you suggesting we'd have <code>std/std</code>? Or keep <code>std/src</code> at the top and only nest the other crates?</p>



<a name="209098719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209098719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209098719">(Sep 04 2020 at 14:18)</a>:</h4>
<p><code>std/std</code></p>



<a name="209115409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209115409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209115409">(Sep 04 2020 at 16:40)</a>:</h4>
<p>I feel like that would be confusing. Not everything in library corresponds to std, right?</p>



<a name="209115453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209115453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209115453">(Sep 04 2020 at 16:40)</a>:</h4>
<p>it also has the runtime I think</p>



<a name="209149275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209149275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209149275">(Sep 04 2020 at 23:16)</a>:</h4>
<p>There's discussion about this in the gh thread for the PR too...</p>



<a name="209149640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209149640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209149640">(Sep 04 2020 at 23:23)</a>:</h4>
<p>just realised that if we changed folder names, and kept the name in cargo.toml the same as the old one, we would have touch 0 imports in other places and thus have less conflicts but it's going to be confusing and a pain at some stage later <span aria-label="grinning" class="emoji emoji-1f600" role="img" title="grinning">:grinning:</span></p>



<a name="209249989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/209249989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#209249989">(Sep 07 2020 at 01:22)</a>:</h4>
<p>created an issue for renaming compiler crates: <a href="https://github.com/rust-lang/rust/issues/76425">https://github.com/rust-lang/rust/issues/76425</a></p>



<a name="210592082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/210592082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#210592082">(Sep 19 2020 at 02:02)</a>:</h4>
<p>I quite like the fact that tests aren't contained in <code>compiler</code>. My main tool to search in the compiler is ripgrep and tests would add tons of noise in some cases. Has it been considered to leave tests inside <code>src/test</code> or move them to a top-level <code>test/</code> directory?</p>



<a name="210592172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/210592172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#210592172">(Sep 19 2020 at 02:05)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120791">RalfJ</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205202579">said</a>:</p>
<blockquote>
<p>Wow this will be so painful for all ongoing parallel development.^^ It will also make code archeology so much more annoying for the next few years as "git blame" is basically unable to follow renames. I hope y'all are convinced that such a hugely disruptive change is really worth it. IMO the current structure isn't great, but it also not so bad to justify so much pain. (Moving submodules is particularly painful in my experience, in particular huge ones like llvm-project.)</p>
</blockquote>
<p>Have you tried adding the <code>--follow</code> flag to git blame?</p>



<a name="210594446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/210594446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#210594446">(Sep 19 2020 at 03:13)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120096">est31</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/210592082">said</a>:</p>
<blockquote>
<p>I quite like the fact that tests aren't contained in <code>compiler</code>. My main tool to search in the compiler is ripgrep and tests would add tons of noise in some cases. Has it been considered to leave tests inside <code>src/test</code> or move them to a top-level <code>test/</code> directory?</p>
</blockquote>
<p>Yes, the same with llvm. That's why the original PR left them where they are for now... I don't think anything has been decided yet</p>



<a name="212218348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Move%20the%20compiler%20to%20a%20new%20%60compiler/%60%20di%E2%80%A6%20compiler-team%23336/near/212218348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336.html#212218348">(Oct 04 2020 at 11:08)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120096">est31</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/210592172">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="120791">RalfJ</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Move.20the.20compiler.20to.20a.20new.20.60compiler.2F.60.20di.E2.80.A6.20compiler-team.23336/near/205202579">said</a>:</p>
<blockquote>
<p>Wow this will be so painful for all ongoing parallel development.^^ It will also make code archeology so much more annoying for the next few years as "git blame" is basically unable to follow renames. I hope y'all are convinced that such a hugely disruptive change is really worth it. IMO the current structure isn't great, but it also not so bad to justify so much pain. (Moving submodules is particularly painful in my experience, in particular huge ones like llvm-project.)</p>
</blockquote>
<p>Have you tried adding the <code>--follow</code> flag to git blame?</p>
</blockquote>
<p>there's no way to do that in the GH UI, is there? I rarely use <code>git blame</code> directly.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>